home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-02 | 1.2 KB | 64 lines | [TEXT/KAHL] |
- /*
- ** CAboutDialog.cp
- **
- ** About box library
- ** Extra code for your application subclass
- **
- ** Copyright © 1993, FrostByte Design / Eric Scouten
- **
- */
-
-
- // add the following lines to your DoCommand method
-
- void C_AppName_App::DoCommand (long theCommand)
-
- {
- CAboutDirector *theAboutDirector = NULL;
-
- switch (theCommand) {
-
-
- // handle “About _AppName_…”
-
- case cmdAbout:
- theAboutDirector = new (CAboutDirector);
- theAboutDirector->IAboutDirector(DLOGAboutBox, this);
- theAboutDirector->DoAbout(FALSE, 0);
- break;
-
-
- // insert other application-wide commands here
-
- default:
- CApplication::DoCommand(theCommand);
- break;
- }
- }
-
-
- // add this method to provide a splash screen (omit it for no splash screen)
-
- /*______________________________________________________________________
- **
- ** Run
- **
- ** Run the application. Overriden to provide splash screen.
- **
- */
-
- void C_AppName_App::Run (void)
-
- {
- CAboutDirector *theAboutDirector = NULL;
-
-
- // show a splash screen (modified about… box), then run the app
-
- theAboutDirector = new (CAboutDirector);
- theAboutDirector->IAboutDirector(DLOGAboutBox, this);
- theAboutDirector->DoAbout(TRUE, kSplashScreenTicks);
-
- CApplication::Run();
-
- }